﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Entity;

public partial class Admin_Pages_FeedBackDelete : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            

            if (Session["login"] != null)
            {
                int feedid = Convert.ToInt32(Request.Params["feedid"]);
                FeedBackUI feedUI = new FeedBackUI();
                int result = feedUI.Delete(feedid);
                if (result > 0)
                {
                    Response.Write("<script>alert('Delete Successful'); window.location='../Pages/FeedBackList.aspx'; </script>");
                }
                else
                {
                    Response.Write("<script>alert('Delete Fail'); window.location='../Pages/FeedBackList.aspx'; </script>");
                }
            }
            else
            {
                Response.Redirect("../Login.aspx");
            }
        }
    }
}
